import ajax from '@/utils/ajax'
import dialog from '@/utils/dialog'
import {IMG_URL} from '@/config'
export default function (query) {
  return ajax({
    url: `/f/babyService/detail?bizType=${query.bizType}&id=${query.id}`,
    method: 'POST',
    data: query
  }).then(({code, data, msg}) => {
    if (code === 1) {
      const list = data.fileUploadList.map(v => IMG_URL + v.fileUrl)
      return list
    } else {
      throw msg
    }
  }).catch(() => dialog.showToast('请求失败'))
}
